<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<link href="css/pushy-buttons.css" rel = "stylesheet">
<link href="css/cloud_bg.css" rel="stylesheet">
<head>
<%@include file = "lianjie.jsp" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
	<style>
		html, body {
			margin: 0;
			padding: 0;
		}

		#clouds {
			width: 100%;
			height: 100%;
		}
	</style>
</head>
<body>
<div class="container" id="clouds" style="background-color: lightskyblue">
    <div class="cloud x1"></div>
    <div class="cloud x2"></div>

	<form name = "fm">
		<table width = "70%" border = "1" cellpadding="3" cellspacing="0">
			<tr>
				<th width = "15%">userID</th>
				<th width = "15%">bookISBN</th>
				<th width = "15%">date</th>
				<th width = "15%">bookname</th>
			</tr>
			<%
			
				String userID = "";
				String bookISBN = "";
				String date = "";
				String bookname = "";
				String select_sql = "select * from borrowinformation";
				ResultSet rs1 = stmt.executeQuery(select_sql);
				while(rs1.next()){
					userID = rs1.getString("userID");
					bookISBN = rs1.getString("bookISBN");
					date = rs1.getString("date");
					bookname = rs1.getString("bookname");
			%>
			<tr align = "center">
				<td><%=userID %></td>
				<td><%=bookISBN %></td>
				<td><%=date %></td>
				<td><%=bookname %></td>
			</tr>
			<%
				}
			%>
		</table>
		<br><br><br>
		<div align = "center">
	
			<input type = "submit" name = "button" value = "返回" onClick = "back_back()" class = "btn btn--md btn--blue">
		</div>
	</form>
</div>
</body>
<script>
	function back_back(){
		document.fm.action = "teacher.jsp";
	}
</script>
</html>